package com.ruyuan.eshop.construction.service;

import com.ruyuan.eshop.construction.builder.FullProductData;
import com.ruyuan.eshop.construction.domain.dto.ItemDetailDTO;
import com.ruyuan.eshop.construction.domain.dto.SaleSkuDTO;
import com.ruyuan.eshop.construction.domain.dto.ProductDTO;
import com.ruyuan.eshop.construction.domain.dto.SkuDetailDTO;
import com.ruyuan.eshop.construction.domain.dto.SkuPriceResultDTO;
import com.ruyuan.eshop.construction.domain.request.QueryItemListRequest;
import com.ruyuan.eshop.construction.domain.request.QuerySaleSkuRequest;
import com.ruyuan.eshop.construction.domain.request.ProductRequest;
import com.ruyuan.eshop.construction.domain.request.QuerySkuListRequest;
import com.ruyuan.eshop.construction.domain.request.SkuPriceRequest;

import java.util.List;

/**
 * 商品服务
 *
 * @author zhonghuashishan
 */
public interface ProductService {

    /**
     * 建品/编辑商品
     *
     * @param request
     * @return com.ruyuan.eshop.construction.domain.dto.ProductDTO
     * @author zhonghuashishan
     */
    ProductDTO product(ProductRequest request);

    /**
     * 修改商品价格接口
     *
     * @param request
     * @return com.ruyuan.eshop.construction.domain.dto.SkuPriceResultDTO
     * @author zhonghuashishan
     */
    SkuPriceResultDTO updatePrice(SkuPriceRequest request);

    /**
     * 查询可售sku
     *
     * @param request
     * @return com.ruyuan.eshop.construction.domain.dto.SaleSkuDTO
     * @author zhonghuashishan
     */
    SaleSkuDTO getSaleSku(QuerySaleSkuRequest request);

    /**
     * 新增/修改数据库的商品信息
     *
     * @param fullProductData
     * @param createFlag
     * @return void
     * @author zhonghuashishan
     */
    void saveOrUpdateDBProduct(FullProductData fullProductData, Boolean createFlag);

    /**
     * 根据itemId查询item信息
     *
     * @param queryItemListRequest
     * @return java.util.List<com.ruyuan.eshop.construction.domain.vo.ItemDetailDTO>
     * @author zhonghuashishan
     */
    List<ItemDetailDTO> listItemByItemIds(QueryItemListRequest queryItemListRequest);

    /**
     *
     * @param request
     * @return
     */
    List<SkuDetailDTO> listSkus(QuerySkuListRequest request);
}
